package com.liu.security.controller;

import com.liu.security.exception.CustomException;
import com.liu.security.pojo.User;
import com.liu.security.pojo.http.ApiResponse;
import lombok.AllArgsConstructor;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
@RequestMapping("Login")
public class LoginController {

    private final UserDetailsService userDetailsService;

    @RequestMapping("login")
    public ApiResponse login(@RequestBody User user){
        throw new CustomException("56湿哒哒实打实大师");
//        userDetailsService.loadUserByUsername(user.getUsername());
//        return new ApiResponse<>( "Request successful", null,200);
    }
}
